/******************************************************************************/
/*!
\file   CVertexBuffer.hpp
\author David Seah Seng Chong
\par    email: sengchong.seah\@digipen.edu
\par    DigiPen login: sengchong.seah
\par    Course: GAM200
\date   03/01/2012
\brief
  Header file
  Graphics Engine

    Copyright (C) 2011 DigiPen Institute of Technology.
    Reproduction or disclosure of this file or its contents without the
    prior written consent of DigiPen Institute of Technology is prohibited.
*/
/******************************************************************************/
#ifndef CVERTEXBUFFER_H
#define CVERTEXBUFFER_H

#include "CustomVertexFormat.hpp"
#include <d3d9.h>




class CVertexBuffer
{
public:
	CVertexBuffer();
	~CVertexBuffer() { Release(); }

	bool  CreateBuffer(  LPDIRECT3DDEVICE9 pDevice, UINT numVertices, DWORD FVF, UINT vertexSize, BOOL dynamic = FALSE );
	void Release();
	bool SetData( UINT numVertices, void *ColorVertices,  DWORD flags );
	void Render( LPDIRECT3DDEVICE9& pDevice, UINT numPrimitives, D3DPRIMITIVETYPE primitiveType );

private:
	LPDIRECT3DVERTEXBUFFER9 m_pVB;
	unsigned int m_numVertices;
	unsigned int m_VertexSize;
	DWORD		 m_FVF;

};









#endif